<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"/>
<meta charset="UTF-8">
<title>对比统计</title>

<link rel="stylesheet" href="/css/vendor/common.css" type="text/css">
<link href="/css/vendor/manual-push.less" rel="stylesheet/less" type="text/css">
<script src="/js/less.min.js"></script>
</head>

<body>
<main>
	<div class="mail-content">
        <table class="push-info" cellpadding="0" cellspacing="0">
            <tr>
                <td><h2>推送类型:</h2></td>
                <td class="value">
                    <select>
                        <option>自定义</option>
                        <option selected>质保</option>
                        <option>随机</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td><h2>推送方式:</h2></td>
                <td class="value">
                    <input type='checkbox' name='push-style' value='monitor' id='cb-monitor' checked><label for='cb-monitor'>监控平台</label>
                    <input type='checkbox' name='push-style' value='email' id='cb-email'><label for='cb-email'>邮箱</label>
                    <input type='checkbox' name='push-style' value='msg' id='cb-msg'><label for='cb-msg'>短信</label>
                    <input type='checkbox' name='push-style' value='manager' id='cb-manager'><label for='cb-manager'>管家</label>
                </td>
            </tr>
        </table>
        
        <h2>接收人:</h2>
        <div id="receiver-box">
            <div id="receiver-list">
                <!-- 已选择的接收人列表 -->
            </div>
            <p class="fold-toggle button remove" onClick="manualPushM.clickReceiverFoldToggle(this)">展开</p>
        </div>
        
        <h2 class="title">主题:</h2>
        <input class="theme" type="text">
        
        <h2 id="content-body-title" class="title">正文:</h2>
        <div id="content-body-box">正文显示区</div>
        
        <p class="send-btn button" onClick="sendMsg()">发 送</p>
	</div>
	
	<div class="mail-contacts">
	    <p class="all-btn button" onClick="manualPushM.clickContactsSelectAll()">选择全部</p>
	    <p class="all-btn button" onClick="manualPushM.clickContactsCancelAll(this)">取消全部</p>
	    
	    <h2>接收人搜索</h2>
	    <input id="contacts-search-input" class="search-bar" type="text" placeholder="搜 索">
	    
	    <div class="contacts-box">
	        <ul id="contacts-list">
                <!-- 联系人列表 -->
	        </ul>
	    </div>
	</div>
</main>
</body>

<script src="/js/jquery-3.2.1.min.js"></script>
<script src="/js/vendor/common.js"></script>
<script src="/js/vendor/manual-push.js"></script>

<script>
	// 初始化源接收人数据
    var list = new Array();
    for (var i = 0; i < 1800; i++) {
        var num = 666666000 + i;
        var item = {title: num+"",
                    detail: "taryn.strosin@gmail.com"+i,
                    id: i,
                    selected: false};
        list.push(item);
    }
    manualPushM.updateAllContacts(list);
    
    // 点击发送
    function sendMsg() {
        var receivers = manualPushM.getReceivers();
        for (var i = 0, len = receivers.length; i < len; i++) {
            var item = receivers[i];
            console.log("id: "+item.id+"  title: "+item.title);
        }
    }
    
</script>

</html>






